<div class="loan-person">
  <!--搜索条件-->
  <div class="search">
    <!--贷款人-->
    <div class="input">
      贷款企业：
      <input type="text" ng-model="userName" placeholder="请输入贷款企业名称">
    </div>
    <div class="input">
      贷款时间：
      <input type="text" wdate-picker max-date="{{creditApplyTimeEnd}}" ng-model="creditApplyTimeStart" placeholder="开始时间"> -
      <input type="text" class="no-ml" wdate-picker min-date="{{creditApplyTimeStart}}" ng-model="creditApplyTimeEnd" placeholder="结束时间">
    </div>
    <button type="button" ng-click="doSearch(1)">查询</button>
  </div>
  <!--状态-->
  <div class="search-inp-ses">
    <button ng-class="{'btn-green font-white': state.selected, 'btn-white font-black': !state.selected}" ng-repeat="state in $CONST.LOAN_STATE" ng-bind="state.label" ng-click="switchState(state)"></button>
  </div>
  <!--搜索内容-->
  <table class="list-table text-c table table-striped">
    <thead class="bg-green font-white">
    <tr>
      <th>订单编号</th>
      <th>贷款企业</th>
      <th>贷款机构</th>
      <th>申请时间</th>
      <th>到期时间</th>
      <th>实际贷款金额</th>
      <th>申请贷款金额</th>
      <th>贷款方式</th>
      <th>贷款状态</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="item in loanList">
      <td ng-bind="item.order_id"></td>
      <td class="td-wc" ng-bind="item.co_name"></td>
      <td class="td-wins" ng-bind="getInstituteName(item.institution_id) || '无'"></td>
      <td ng-bind="item.loay_apply_time"></td>
      <td ng-bind="item.end_data"></td>
      <td ng-bind="(item.amount || 0) + '元'"></td>
      <td ng-bind="(item.applyAmount || 0) + '元'"></td>
      <td ng-bind="item.lnci_type | lnci_type"></td>
      <td ng-bind="$status.name(item.clerk_status, item.employee_status)"></td>
      <td class="font-yellow cursor">
        <span ng-click="toDetail(item, 1)" ng-if="$status.showAuditButton(item)">审核</span>
        <span ng-click="toDetail(item)" ng-if="$status.showDetailButton(item)">查看详情</span>
        <span ng-if="$status.showToastCustomer(item)">|</span>
        <span ng-click="popUpNotify(item)" ng-if="$status.showToastCustomer(item)">通知客户</span>
        <!--如果是订单贷款且风控审核通过，则展示一下2项-->
        <span ng-if="$status.showInterest(item) && userRole != 1">|</span>
        <span ng-click="toInterestDetail(item)" ng-if="$status.showInterest(item)">查看利息</span>
      </td>
    </tr>
    <tr ng-show="loanList.length == 0"><td colspan="10">暂无贷款数据</td></tr>
    </tbody>
  </table>
  <!--分页组件-->
  <app-page ng-if="totalPage > 1" current="currentPage" totals="totalPage" fn="changePage"></app-page>
  <!--模态框创建-->
  <pop-up name="{{title}}" show="show" list="list" button="['取消', '确定']" on="notifyClients()"></pop-up>
</div>
